import request from '@/utils/request'

// User registration to obtain verification code
export function getCode(data) {
  return request({
    url: '/register/getRegisterSMSWeb',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// User registration (mobile phone)
export function save(data) {
  return request({
    url: '/register/registerCustomerWeb',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

/**
 * User registration (email)
 * @param {*} data
 * @returns
 */
export function saveEmail(data) {
  return request({
    url: '/registerEmail/registerCustomer',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
/**
 * @param {Object} data
 */
export function regOrLogin(data) {
  return request({
    url: '/registerEmail/registOrlogin',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
/**
 * Obtain the email verification code
 * @param {*} data
 * @returns
 */
export function getEmailCode(data) {
  return request({
    url: '/registerEmail/sendEmail',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
/**
 * @param {Object} data
 */
export function getForgetEmailCode(data) {
  return request({
    url: '/registerEmail/getForgetPwdEmail',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
/**
 * get Team List
 * @param {*} data
 * @returns
 */
export function getTeamInfo(data) {
  return request({
    url: '/register/getTeamInfo',
    method: 'post',
	headers: {
	  'Content-Type': 'application/json'
	},
    data
  })
}